package org.darkforest.dao.mapper;

import org.darkforest.dao.annotation.DBMapper;
import org.darkforest.model.OrderGiftCode;

import java.util.List;

@DBMapper
public interface OrderGiftCodeMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(OrderGiftCode record);

    int insertSelective(OrderGiftCode record);

    OrderGiftCode selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(OrderGiftCode record);

    int updateByPrimaryKey(OrderGiftCode record);

    int selectCountByCode(String code);

    /**
     * 根据礼品码查询
     * @param giftCode
     * @return
     */
    OrderGiftCode selectByGiftCode(String giftCode);

    /***
     * 根据条件查询
     * @param record
     * @return
     */
    List<OrderGiftCode> selectByCondition(OrderGiftCode record);


}